This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Cmd+Shift+Enter.
library(tidyverse)
library(dplyr)
library(tidyverse)
library(caret)
library(rpart)
library(rpart.plot)
library(kernlab)
library(ggplot2)
library(tidyverse)
library(maps)
library(mapproj)
library(jsonlite)
library(corrr)
HousePrices <- read_csv('house_prices.csv')
Warning: One or more parsing issues, call `problems()` on your data
frame for details, e.g.:
dat <- vroom(...)
problems(dat)Rows: 187531 Columns: 21── Column specification ───────────────────────────────────────
Delimiter: ","
chr (15): Title, Description, Amount(in rupees), location, ...
dbl (4): Index, Price (in rupees), Bathroom, Balcony
lgl (2): Dimensions, Plot Area
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
colnames(HousePrices)
[1] "Index" "Title"
[3] "Description" "Amount(in rupees)"
[5] "Price (in rupees)" "location"
[7] "Carpet Area" "Status"
[9] "Floor" "Transaction"
[11] "Furnishing" "facing"
[13] "overlooking" "Society"
[15] "Bathroom" "Balcony"
[17] "Car Parking" "Ownership"
[19] "Super Area" "Dimensions"
[21] "Plot Area"
colnames(HousePrices)
[1] "Index" "Title"
[3] "Description" "Amount(in rupees)"
[5] "Price (in rupees)" "location"
[7] "Carpet Area" "Status"
[9] "Floor" "Transaction"
[11] "Furnishing" "facing"
[13] "overlooking" "Society"
[15] "Bathroom" "Balcony"
[17] "Car Parking" "Ownership"
[19] "Super Area" "Dimensions"
[21] "Plot Area"
row.names(HousePrices)
[1] "1" "2" "3" "4" "5" "6" "7" "8"
[9] "9" "10" "11" "12" "13" "14" "15" "16"
[17] "17" "18" "19" "20" "21" "22" "23" "24"
[25] "25" "26" "27" "28" "29" "30" "31" "32"
[33] "33" "34" "35" "36" "37" "38" "39" "40"
[41] "41" "42" "43" "44" "45" "46" "47" "48"
[49] "49" "50" "51" "52" "53" "54" "55" "56"
[57] "57" "58" "59" "60" "61" "62" "63" "64"
[65] "65" "66" "67" "68" "69" "70" "71" "72"
[73] "73" "74" "75" "76" "77" "78" "79" "80"
[81] "81" "82" "83" "84" "85" "86" "87" "88"
[89] "89" "90" "91" "92" "93" "94" "95" "96"
[97] "97" "98" "99" "100" "101" "102" "103" "104"
[105] "105" "106" "107" "108" "109" "110" "111" "112"
[113] "113" "114" "115" "116" "117" "118" "119" "120"
[121] "121" "122" "123" "124" "125" "126" "127" "128"
[129] "129" "130" "131" "132" "133" "134" "135" "136"
[137] "137" "138" "139" "140" "141" "142" "143" "144"
[145] "145" "146" "147" "148" "149" "150" "151" "152"
[153] "153" "154" "155" "156" "157" "158" "159" "160"
[161] "161" "162" "163" "164" "165" "166" "167" "168"
[169] "169" "170" "171" "172" "173" "174" "175" "176"
[177] "177" "178" "179" "180" "181" "182" "183" "184"
[185] "185" "186" "187" "188" "189" "190" "191" "192"
[193] "193" "194" "195" "196" "197" "198" "199" "200"
[201] "201" "202" "203" "204" "205" "206" "207" "208"
[209] "209" "210" "211" "212" "213" "214" "215" "216"
[217] "217" "218" "219" "220" "221" "222" "223" "224"
[225] "225" "226" "227" "228" "229" "230" "231" "232"
[233] "233" "234" "235" "236" "237" "238" "239" "240"
[241] "241" "242" "243" "244" "245" "246" "247" "248"
[249] "249" "250" "251" "252" "253" "254" "255" "256"
[257] "257" "258" "259" "260" "261" "262" "263" "264"
[265] "265" "266" "267" "268" "269" "270" "271" "272"
[273] "273" "274" "275" "276" "277" "278" "279" "280"
[281] "281" "282" "283" "284" "285" "286" "287" "288"
[289] "289" "290" "291" "292" "293" "294" "295" "296"
[297] "297" "298" "299" "300" "301" "302" "303" "304"
[305] "305" "306" "307" "308" "309" "310" "311" "312"
[313] "313" "314" "315" "316" "317" "318" "319" "320"
[321] "321" "322" "323" "324" "325" "326" "327" "328"
[329] "329" "330" "331" "332" "333" "334" "335" "336"
[337] "337" "338" "339" "340" "341" "342" "343" "344"
[345] "345" "346" "347" "348" "349" "350" "351" "352"
[353] "353" "354" "355" "356" "357" "358" "359" "360"
[361] "361" "362" "363" "364" "365" "366" "367" "368"
[369] "369" "370" "371" "372" "373" "374" "375" "376"
[377] "377" "378" "379" "380" "381" "382" "383" "384"
[385] "385" "386" "387" "388" "389" "390" "391" "392"
[393] "393" "394" "395" "396" "397" "398" "399" "400"
[401] "401" "402" "403" "404" "405" "406" "407" "408"
[409] "409" "410" "411" "412" "413" "414" "415" "416"
[417] "417" "418" "419" "420" "421" "422" "423" "424"
[425] "425" "426" "427" "428" "429" "430" "431" "432"
[433] "433" "434" "435" "436" "437" "438" "439" "440"
[441] "441" "442" "443" "444" "445" "446" "447" "448"
[449] "449" "450" "451" "452" "453" "454" "455" "456"
[457] "457" "458" "459" "460" "461" "462" "463" "464"
[465] "465" "466" "467" "468" "469" "470" "471" "472"
[473] "473" "474" "475" "476" "477" "478" "479" "480"
[481] "481" "482" "483" "484" "485" "486" "487" "488"
[489] "489" "490" "491" "492" "493" "494" "495" "496"
[497] "497" "498" "499" "500" "501" "502" "503" "504"
[505] "505" "506" "507" "508" "509" "510" "511" "512"
[513] "513" "514" "515" "516" "517" "518" "519" "520"
[521] "521" "522" "523" "524" "525" "526" "527" "528"
[529] "529" "530" "531" "532" "533" "534" "535" "536"
[537] "537" "538" "539" "540" "541" "542" "543" "544"
[545] "545" "546" "547" "548" "549" "550" "551" "552"
[553] "553" "554" "555" "556" "557" "558" "559" "560"
[561] "561" "562" "563" "564" "565" "566" "567" "568"
[569] "569" "570" "571" "572" "573" "574" "575" "576"
[577] "577" "578" "579" "580" "581" "582" "583" "584"
[585] "585" "586" "587" "588" "589" "590" "591" "592"
[593] "593" "594" "595" "596" "597" "598" "599" "600"
[601] "601" "602" "603" "604" "605" "606" "607" "608"
[609] "609" "610" "611" "612" "613" "614" "615" "616"
[617] "617" "618" "619" "620" "621" "622" "623" "624"
[625] "625" "626" "627" "628" "629" "630" "631" "632"
[633] "633" "634" "635" "636" "637" "638" "639" "640"
[641] "641" "642" "643" "644" "645" "646" "647" "648"
[649] "649" "650" "651" "652" "653" "654" "655" "656"
[657] "657" "658" "659" "660" "661" "662" "663" "664"
[665] "665" "666" "667" "668" "669" "670" "671" "672"
[673] "673" "674" "675" "676" "677" "678" "679" "680"
[681] "681" "682" "683" "684" "685" "686" "687" "688"
[689] "689" "690" "691" "692" "693" "694" "695" "696"
[697] "697" "698" "699" "700" "701" "702" "703" "704"
[705] "705" "706" "707" "708" "709" "710" "711" "712"
[713] "713" "714" "715" "716" "717" "718" "719" "720"
[721] "721" "722" "723" "724" "725" "726" "727" "728"
[729] "729" "730" "731" "732" "733" "734" "735" "736"
[737] "737" "738" "739" "740" "741" "742" "743" "744"
[745] "745" "746" "747" "748" "749" "750" "751" "752"
[753] "753" "754" "755" "756" "757" "758" "759" "760"
[761] "761" "762" "763" "764" "765" "766" "767" "768"
[769] "769" "770" "771" "772" "773" "774" "775" "776"
[777] "777" "778" "779" "780" "781" "782" "783" "784"
[785] "785" "786" "787" "788" "789" "790" "791" "792"
[793] "793" "794" "795" "796" "797" "798" "799" "800"
[801] "801" "802" "803" "804" "805" "806" "807" "808"
[809] "809" "810" "811" "812" "813" "814" "815" "816"
[817] "817" "818" "819" "820" "821" "822" "823" "824"
[825] "825" "826" "827" "828" "829" "830" "831" "832"
[833] "833" "834" "835" "836" "837" "838" "839" "840"
[841] "841" "842" "843" "844" "845" "846" "847" "848"
[849] "849" "850" "851" "852" "853" "854" "855" "856"
[857] "857" "858" "859" "860" "861" "862" "863" "864"
[865] "865" "866" "867" "868" "869" "870" "871" "872"
[873] "873" "874" "875" "876" "877" "878" "879" "880"
[881] "881" "882" "883" "884" "885" "886" "887" "888"
[889] "889" "890" "891" "892" "893" "894" "895" "896"
[897] "897" "898" "899" "900" "901" "902" "903" "904"
[905] "905" "906" "907" "908" "909" "910" "911" "912"
[913] "913" "914" "915" "916" "917" "918" "919" "920"
[921] "921" "922" "923" "924" "925" "926" "927" "928"
[929] "929" "930" "931" "932" "933" "934" "935" "936"
[937] "937" "938" "939" "940" "941" "942" "943" "944"
[945] "945" "946" "947" "948" "949" "950" "951" "952"
[953] "953" "954" "955" "956" "957" "958" "959" "960"
[961] "961" "962" "963" "964" "965" "966" "967" "968"
[969] "969" "970" "971" "972" "973" "974" "975" "976"
[977] "977" "978" "979" "980" "981" "982" "983" "984"
[985] "985" "986" "987" "988" "989" "990" "991" "992"
[993] "993" "994" "995" "996" "997" "998" "999" "1000"
[ reached getOption("max.print") -- omitted 186531 entries ]
head(HousePrices)
getwd()
[1] "/Users/shaunmckellarjr/Desktop/Intro to Data Science Class/Intro to DS project FIles"
Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Cmd+Option+I.
When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Cmd+Shift+K to preview the HTML file).
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
str(HousePrices)
spc_tbl_ [187,531 × 21] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
$ Index : num [1:187531] 0 1 2 3 4 5 6 7 8 9 ...
$ Title : chr [1:187531] "1 BHK Ready to Occupy Flat for sale in Srushti Siddhi Mangal Murti Complex Bhiwandi" "2 BHK Ready to Occupy Flat for sale in Dosti Vihar Pokhran Road" "2 BHK Ready to Occupy Flat for sale in Sunrise by Kalpataru Kolshet Road" "1 BHK Ready to Occupy Flat for sale Kasheli" ...
$ Description : chr [1:187531] "Bhiwandi, Thane has an attractive 1 BHK Flat for sale. The property is ideally located in a strategic location "| __truncated__ "One can find this stunning 2 BHK flat for sale in Pokhran Road, Thane. It enjoys an excellent location within t"| __truncated__ "Up for immediate sale is a 2 BHK apartment in Kolshet Road, Thane. Don't miss this bargain flat for sale. Situa"| __truncated__ "This beautiful 1 BHK Flat is available for sale in Kasheli, Thane. This flat for resale has a desirable locatio"| __truncated__ ...
$ Amount(in rupees): chr [1:187531] "42 Lac" "98 Lac" "1.40 Cr" "25 Lac" ...
$ Price (in rupees): num [1:187531] 6000 13799 17500 NA 18824 ...
$ location : chr [1:187531] "thane" "thane" "thane" "thane" ...
$ Carpet Area : chr [1:187531] "500 sqft" "473 sqft" "779 sqft" "530 sqft" ...
$ Status : chr [1:187531] "Ready to Move" "Ready to Move" "Ready to Move" "Ready to Move" ...
$ Floor : chr [1:187531] "10 out of 11" "3 out of 22" "10 out of 29" "1 out of 3" ...
$ Transaction : chr [1:187531] "Resale" "Resale" "Resale" "Resale" ...
$ Furnishing : chr [1:187531] "Unfurnished" "Semi-Furnished" "Unfurnished" "Unfurnished" ...
$ facing : chr [1:187531] NA "East" "East" NA ...
$ overlooking : chr [1:187531] NA "Garden/Park" "Garden/Park" NA ...
$ Society : chr [1:187531] "Srushti Siddhi Mangal Murti Complex" "Dosti Vihar" "Sunrise by Kalpataru" NA ...
$ Bathroom : num [1:187531] 1 2 2 1 2 1 1 1 1 3 ...
$ Balcony : num [1:187531] 2 NA NA 1 NA 1 NA NA NA 1 ...
$ Car Parking : chr [1:187531] NA "1 Open" "1 Covered" NA ...
$ Ownership : chr [1:187531] NA "Freehold" "Freehold" NA ...
$ Super Area : chr [1:187531] NA NA NA NA ...
$ Dimensions : logi [1:187531] NA NA NA NA NA NA ...
$ Plot Area : logi [1:187531] NA NA NA NA NA NA ...
- attr(*, "spec")=
.. cols(
.. Index = col_double(),
.. Title = col_character(),
.. Description = col_character(),
.. `Amount(in rupees)` = col_character(),
.. `Price (in rupees)` = col_double(),
.. location = col_character(),
.. `Carpet Area` = col_character(),
.. Status = col_character(),
.. Floor = col_character(),
.. Transaction = col_character(),
.. Furnishing = col_character(),
.. facing = col_character(),
.. overlooking = col_character(),
.. Society = col_character(),
.. Bathroom = col_double(),
.. Balcony = col_double(),
.. `Car Parking` = col_character(),
.. Ownership = col_character(),
.. `Super Area` = col_character(),
.. Dimensions = col_logical(),
.. `Plot Area` = col_logical()
.. )
- attr(*, "problems")=<externalptr>
missing_values <- colSums(is.na(HousePrices))
print(missing_values)
Index Title Description Amount(in rupees) Price (in rupees)
0 0 3023 0 17665
location Carpet Area Status Floor Transaction
0 80673 615 7077 83
Furnishing facing overlooking Society Bathroom
2897 70233 81436 109678 863
Balcony Car Parking Ownership Super Area Dimensions
48957 103357 65517 107685 187531
Plot Area
187531
str(HousePrices)
spc_tbl_ [187,531 × 21] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
$ Index : num [1:187531] 0 1 2 3 4 5 6 7 8 9 ...
$ Title : chr [1:187531] "1 BHK Ready to Occupy Flat for sale in Srushti Siddhi Mangal Murti Complex Bhiwandi" "2 BHK Ready to Occupy Flat for sale in Dosti Vihar Pokhran Road" "2 BHK Ready to Occupy Flat for sale in Sunrise by Kalpataru Kolshet Road" "1 BHK Ready to Occupy Flat for sale Kasheli" ...
$ Description : chr [1:187531] "Bhiwandi, Thane has an attractive 1 BHK Flat for sale. The property is ideally located in a strategic location "| __truncated__ "One can find this stunning 2 BHK flat for sale in Pokhran Road, Thane. It enjoys an excellent location within t"| __truncated__ "Up for immediate sale is a 2 BHK apartment in Kolshet Road, Thane. Don't miss this bargain flat for sale. Situa"| __truncated__ "This beautiful 1 BHK Flat is available for sale in Kasheli, Thane. This flat for resale has a desirable locatio"| __truncated__ ...
$ Amount(in rupees): chr [1:187531] "42 Lac" "98 Lac" "1.40 Cr" "25 Lac" ...
$ Price (in rupees): num [1:187531] 6000 13799 17500 NA 18824 ...
$ location : chr [1:187531] "thane" "thane" "thane" "thane" ...
$ Carpet Area : chr [1:187531] "500 sqft" "473 sqft" "779 sqft" "530 sqft" ...
$ Status : chr [1:187531] "Ready to Move" "Ready to Move" "Ready to Move" "Ready to Move" ...
$ Floor : chr [1:187531] "10 out of 11" "3 out of 22" "10 out of 29" "1 out of 3" ...
$ Transaction : chr [1:187531] "Resale" "Resale" "Resale" "Resale" ...
$ Furnishing : chr [1:187531] "Unfurnished" "Semi-Furnished" "Unfurnished" "Unfurnished" ...
$ facing : chr [1:187531] NA "East" "East" NA ...
$ overlooking : chr [1:187531] NA "Garden/Park" "Garden/Park" NA ...
$ Society : chr [1:187531] "Srushti Siddhi Mangal Murti Complex" "Dosti Vihar" "Sunrise by Kalpataru" NA ...
$ Bathroom : num [1:187531] 1 2 2 1 2 1 1 1 1 3 ...
$ Balcony : num [1:187531] 2 NA NA 1 NA 1 NA NA NA 1 ...
$ Car Parking : chr [1:187531] NA "1 Open" "1 Covered" NA ...
$ Ownership : chr [1:187531] NA "Freehold" "Freehold" NA ...
$ Super Area : chr [1:187531] NA NA NA NA ...
$ Dimensions : logi [1:187531] NA NA NA NA NA NA ...
$ Plot Area : logi [1:187531] NA NA NA NA NA NA ...
- attr(*, "spec")=
.. cols(
.. Index = col_double(),
.. Title = col_character(),
.. Description = col_character(),
.. `Amount(in rupees)` = col_character(),
.. `Price (in rupees)` = col_double(),
.. location = col_character(),
.. `Carpet Area` = col_character(),
.. Status = col_character(),
.. Floor = col_character(),
.. Transaction = col_character(),
.. Furnishing = col_character(),
.. facing = col_character(),
.. overlooking = col_character(),
.. Society = col_character(),
.. Bathroom = col_double(),
.. Balcony = col_double(),
.. `Car Parking` = col_character(),
.. Ownership = col_character(),
.. `Super Area` = col_character(),
.. Dimensions = col_logical(),
.. `Plot Area` = col_logical()
.. )
- attr(*, "problems")=<externalptr>
ncol(HousePrices)
[1] 21
nrow(HousePrices)
[1] 187531
str(missing_values)
Named num [1:21] 0 0 3023 0 17665 ...
- attr(*, "names")= chr [1:21] "Index" "Title" "Description" "Amount(in rupees)" ...
threshold_percent <- 50
# Calculate the percentage of missing values in each column
missing_percent <- (colSums(is.na(HousePrices)) / nrow(HousePrices)) * 100
columns_to_keep <- missing_percent <= threshold_percent
filtered_Housing_Prices <- HousePrices[, columns_to_keep]
str(filtered_Housing_Prices)
tibble [187,531 × 16] (S3: tbl_df/tbl/data.frame)
$ Index : num [1:187531] 0 1 2 3 4 5 6 7 8 9 ...
$ Title : chr [1:187531] "1 BHK Ready to Occupy Flat for sale in Srushti Siddhi Mangal Murti Complex Bhiwandi" "2 BHK Ready to Occupy Flat for sale in Dosti Vihar Pokhran Road" "2 BHK Ready to Occupy Flat for sale in Sunrise by Kalpataru Kolshet Road" "1 BHK Ready to Occupy Flat for sale Kasheli" ...
$ Description : chr [1:187531] "Bhiwandi, Thane has an attractive 1 BHK Flat for sale. The property is ideally located in a strategic location "| __truncated__ "One can find this stunning 2 BHK flat for sale in Pokhran Road, Thane. It enjoys an excellent location within t"| __truncated__ "Up for immediate sale is a 2 BHK apartment in Kolshet Road, Thane. Don't miss this bargain flat for sale. Situa"| __truncated__ "This beautiful 1 BHK Flat is available for sale in Kasheli, Thane. This flat for resale has a desirable locatio"| __truncated__ ...
$ Amount(in rupees): chr [1:187531] "42 Lac" "98 Lac" "1.40 Cr" "25 Lac" ...
$ Price (in rupees): num [1:187531] 6000 13799 17500 NA 18824 ...
$ location : chr [1:187531] "thane" "thane" "thane" "thane" ...
$ Carpet Area : chr [1:187531] "500 sqft" "473 sqft" "779 sqft" "530 sqft" ...
$ Status : chr [1:187531] "Ready to Move" "Ready to Move" "Ready to Move" "Ready to Move" ...
$ Floor : chr [1:187531] "10 out of 11" "3 out of 22" "10 out of 29" "1 out of 3" ...
$ Transaction : chr [1:187531] "Resale" "Resale" "Resale" "Resale" ...
$ Furnishing : chr [1:187531] "Unfurnished" "Semi-Furnished" "Unfurnished" "Unfurnished" ...
$ facing : chr [1:187531] NA "East" "East" NA ...
$ overlooking : chr [1:187531] NA "Garden/Park" "Garden/Park" NA ...
$ Bathroom : num [1:187531] 1 2 2 1 2 1 1 1 1 3 ...
$ Balcony : num [1:187531] 2 NA NA 1 NA 1 NA NA NA 1 ...
$ Ownership : chr [1:187531] NA "Freehold" "Freehold" NA ...
print(filtered_Housing_Prices)
filtered_Housing_Prices
# Drop rows with NaN values in the 'Price (in rupees)' column
filtered_housing_prices <- HousePrices[complete.cases(HousePrices$`Price (in rupees)`),]
filtered_housing_prices
# Drop rows with NaN values in the 'Carpet Area' column
filtered_house_prices <- HousePrices[complete.cases(HousePrices$`Carpet Area`), ]
print(filtered_house_prices)
# Remove 'Dimensions' and 'Plot Area' columns
filtered_house_prices <- HousePrices[, !names(HousePrices) %in% c("Dimensions", "Plot Area")]
print(filtered_Housing_Prices)
# Convert 'Price (in rupees)' values from Lakhs to Crores
filtered_house_prices$`Price (in rupees)` <- filtered_house_prices$`Price (in rupees)` / 100
# Display the 'Price (in rupees)' column
head(filtered_house_prices$`Price (in rupees)`)
[1] 60.00 137.99 175.00 NA 188.24 66.18
head(filtered_Housing_Prices)
# Remove rows with NA values
Cleaned_House_Prices <- na.omit(filtered_Housing_Prices)
head(Cleaned_House_Prices)
str(Cleaned_House_Prices)
tibble [64,430 × 16] (S3: tbl_df/tbl/data.frame)
$ Index : num [1:64430] 9 13 15 16 21 28 29 30 31 32 ...
$ Title : chr [1:64430] "3 BHK Ready to Occupy Flat for sale in Pride Palms Kolshet" "4 BHK Ready to Occupy Flat for sale Hiranandani Estate" "2 BHK Ready to Occupy Flat for sale in Puraniks Tokyo Bay Kasarvadavali" "1 BHK Ready to Occupy Flat for sale in Green Woods Shilphata" ...
$ Description : chr [1:64430] "One can find this stunning 3 BHK flat for sale in Kolshet, Thane. Ideally situated in the Pride Palms township "| __truncated__ "Creatively planned and constructed is a 4 BHK flat for sale in Hiranandani Estate, Thane. This flat is an attra"| __truncated__ "Kasarvadavali, Thane has an appealing 2 BHK flat for sale with various amenities. It is housed in the well-plan"| __truncated__ "Have a look at this immaculate 1 BHK flat for sale in Shilphata, Thane. Situated in the Green Woods township, i"| __truncated__ ...
$ Amount(in rupees): chr [1:64430] "1.60 Cr" "4.25 Cr" "90 Lac" "37 Lac" ...
$ Price (in rupees): num [1:64430] 11150 17526 10000 5736 15000 ...
$ location : chr [1:64430] "thane" "thane" "thane" "thane" ...
$ Carpet Area : chr [1:64430] "900 sqft" "1820 sqft" "675 sqft" "647 sqft" ...
$ Status : chr [1:64430] "Ready to Move" "Ready to Move" "Ready to Move" "Ready to Move" ...
$ Floor : chr [1:64430] "3 out of 27" "18 out of 27" "10 out of 16" "5 out of 7" ...
$ Transaction : chr [1:64430] "Resale" "Resale" "New Property" "New Property" ...
$ Furnishing : chr [1:64430] "Unfurnished" "Semi-Furnished" "Unfurnished" "Unfurnished" ...
$ facing : chr [1:64430] "East" "East" "North - East" "East" ...
$ overlooking : chr [1:64430] "Garden/Park" "Garden/Park" "Garden/Park, Main Road" "Garden/Park" ...
$ Bathroom : num [1:64430] 3 4 2 1 2 3 1 3 2 2 ...
$ Balcony : num [1:64430] 1 1 1 2 2 3 1 1 2 1 ...
$ Ownership : chr [1:64430] "Freehold" "Freehold" "Freehold" "Freehold" ...
- attr(*, "na.action")= 'omit' Named int [1:123101] 1 2 3 4 5 6 7 8 9 11 ...
..- attr(*, "names")= chr [1:123101] "1" "2" "3" "4" ...
view(Cleaned_House_Prices$`Carpet Area`)
Showing the first 1000 rows.
# Create a bar plot to compare the counts of "Ready to Move" vs. "Not Ready"
ggplot(data = Cleaned_House_Prices, aes(x = Status, fill = Status)) +
geom_bar() +
labs(title = "Comparison of 'Ready to Move' vs. 'Not Ready'",
x = "Status",
y = "Count") +
scale_fill_manual(values = c("Ready to Move" = "green", "Not Ready" = "red"))
# Print the correlation coefficient
print(correlation)
[1] -0.02206333 NA 0.09250467 0.04802626
view(Cleaned_House_Prices$Status)
Showing the first 1000 rows.